package com.sandu.voiceassistant;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

public class VoiceInfo implements Parcelable {
    String type; //addFirst addLast normal

    String voiceMsg;

    public String getVoiceMsg() {
        return voiceMsg;
    }

    public void setVoiceMsg(String voiceMsg) {
        this.voiceMsg = voiceMsg;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public VoiceInfo() {

    }
    protected VoiceInfo(Parcel in) {
        type = in.readString();
        voiceMsg = in.readString();
    }

    public static final Creator<VoiceInfo> CREATOR = new Creator<VoiceInfo>() {
        @Override
        public VoiceInfo createFromParcel(Parcel in) {
            return new VoiceInfo(in);
        }

        @Override
        public VoiceInfo[] newArray(int size) {
            return new VoiceInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(type);
        dest.writeString(voiceMsg);
    }

    public void readFromParcel(Parcel in) {
        type = in.readString();
        voiceMsg = in.readString();
    }

    @Override
    public String toString() {
        return "StudentInfo{" +
                "id='" + type + '\'' +
                ", name='" + voiceMsg + '\'' +
                '}';
    }
}
